{extend name="default/base/base_seller" /}
{block name="seller_main"}

<style>
.bill-alert-block{padding-bottom:14px;padding-top:14px}
.bill_alert{background-color:#F9FAFC;border:1px solid #F1F1F1;margin-bottom:20px;padding:8px 35px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,.5);line-height:30px}
</style>
<div class="bill_alert bill-alert-block mt10">
    <div style="width:800px"><h3 style="float:left">{$Think.lang.current_settlement}</h3><div style="float:right;">
            {if $bill_info['ob_state'] == BILL_STATE_CREATE}
            <a class="dssc-btn mt5" onclick="ds_ajaxget_confirm('{:url('Sellerbill/confirm_bill',['ob_no'=>$bill_info.ob_no])}','{$Think.lang.confirmation_will_restored}<BR/>{$Think.lang.verify_system_billing}');" href="javascript:void(0)">{$Think.lang.current_settlement_correct}</a>
            {elseif $bill_info['ob_state'] == BILL_STATE_SUCCESS /}
            <a class="dssc-btn mt5" target="_blank" href="{:url('Sellerbill/bill_print',['ob_no'=>$bill_info.ob_no])}">{$Think.lang.print_statement}</a>
            {/if}
        </div>
        <div style="clear:both"></div>
    </div>
    <ul>
        <li>{$Think.lang.settlement_number}：{$bill_info.ob_no}&emsp;{$bill_info.ob_startdate|date="Y-m-d"} &nbsp;{$Think.lang.sellerbill_to}&nbsp; {$bill_info.ob_enddate|date="Y-m-d"}</li>
        <li>{$Think.lang.chuzhang_time}：{$bill_info.ob_createdate|date="Y-m-d"}</li>
        <li>{$Think.lang.current_receivables}：{$bill_info.ob_result_totals} = {$bill_info.ob_order_totals} ({$Think.lang.order_amount}) - {$bill_info.ob_commis_totals} ({$Think.lang.commission_amount}) - {$bill_info.ob_order_return_totals} ({$Think.lang.refund_amount}) + {$bill_info.ob_commis_return_totals} ({$Think.lang.return_commission}) - {$bill_info.ob_store_cost_totals} ({$Think.lang.cost_sales_promotion}) - {$bill_info.ob_inviter_totals} ({$Think.lang.distribution_commission})</li>
        <li>{$Think.lang.settlement_status}：{:get_bill_state($bill_info['ob_state'])}{if $bill_info['ob_state'] == BILL_STATE_SUCCESS}，{$Think.lang.settlement_date}：{$bill_info.ob_paydate|date="Y-m-d"}{/if}
        </li>
    </ul>
</div>
<!--区分部分 BEGIN-->



<form method="get" id="formSearch">
    <table class="search-form">
        <input type="hidden" name='type' value='{$Request.param.type}' />
        <tr>
            <td>&nbsp;</td>
            <th>{$Think.lang.refund_number}</th>
            <td class="w180"><input type="text" class="text"  value="" name="query_order_no" /></td>
            <th>{$Think.lang.refund_time}</th>
            <td class="w180">
                <input type="text" class="text w70" name="query_start_date" id="query_start_date" value="{$Request.param.query_start_date}"/>
                &#8211;
                <input type="text" class="text w70" name="query_end_date" id="query_end_date" value="{$Request.param.query_end_date}"/>
            </td>
            <td class="tc w180">
                <input type="submit" class="submit" value="{$Think.lang.ds_search}" />
            </td>
    </table>
</form>
<table class="dssc-default-table">
    <thead>
        <tr>
            <th class="w10"></th>
            <th>{$Think.lang.refund_number}</th>
            <th>{$Think.lang.order_number}</th>
            <th>{$Think.lang.refund_amount}</th>
            <th>{$Think.lang.return_commission}</th>
            <th>{$Think.lang.sellerbill_type}</th>
            <th>{$Think.lang.refund_time}</th>
        </tr>
    </thead>
    <tbody>
        {notempty name="refund_list"}
        {foreach name="refund_list" item="refund_info" }
        <tr class="bd-line">
            <td></td>
            <td>{$refund_info.refund_sn}</td>
            <td>{$refund_info.order_sn}</td>
            <td>{$refund_info.refund_amount}</td>
            <td>{:ds_price_format($refund_info['commis_amount'])}</td>
            <td>{:str_replace(array(1,2), array('{$Think.lang.sellerbill_refund} ','{$Think.lang.sellerbill_return}'),$refund_info['refund_type'])}</td>
            <td>{$refund_info.admin_time|date="Y-m-d"}</td>
        </tr>
        {/foreach}
        {else /}
        <tr>
            <td colspan="20" class="norecord"><i>&nbsp;</i><span>{$Think.lang.no_record}</span></td>
        </tr>
        {/notempty}
    </tbody>
    <tfoot>
        {notempty name="refund_list"}
        <tr>
            <td colspan="20"><div class="pagination">{$show_page|raw}</div></td>
        </tr>
        {/notempty}
    </tfoot>
</table>





<!--区分部分 END-->
        <script type="text/javascript">
                        $(document).ready(function() {
                            $('#query_start_date').datepicker({dateFormat: 'yy-mm-dd'});
                            $('#query_end_date').datepicker({dateFormat: 'yy-mm-dd'});
                        });
        </script>

{/block}
